<template>
  <div>
    <div class="boy">我的女朋友是{{ uname }},已经{{ age }}岁了</div>
    <div class="girl">
      我男朋友是{{ boyfriend.uname }},已经{{ boyfriend.age }}岁了，爱好是给自己的{{ boyfriend.hobby[1] }}做饭吃
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      uname: '李晶',
      age: 20,
      boyfriend: {
        uname: '姚伟',
        age: 21,
        hobby: ['打游戏', '女朋友']
      }
    }
  }
}
</script>

<style lang="less">
.boy {
  color: pink;
}
.girl {
  color: greenyellow;
}
</style>
>
